/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-12-15 15:21:28
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 列表查询
export const getList = (params) => axios.get(`${SERVER.WHOLESALES}/retailSet/getInfo`, {params})
// 新增
export const addSave = (params) => axios.post(`${SERVER.WHOLESALES}/retailSet/retailSetSave`, params)
// 编辑
export const emitSave = (params) => axios.post(`${SERVER.WHOLESALES}/retailSet/retailSetSave`, params)
// 导入经销商
export const importDealer = (params) => axios.post(`${SERVER.WHOLESALES}/retailSetDealer/dealerImportFromExcel`, params)

export const importProduct = (params) => axios.post(`${SERVER.WHOLESALES}/retailSetDealer/productImportFromExcel`, params)

// 查询导入经销商
export const getdealerList = (params) => axios.get(`${SERVER.WHOLESALES}/retailSetDealer/getInfo`, {params})

// 查询导入经销商
export const getProductList = (params) => axios.get(`${SERVER.WHOLESALES}/retailSetProduct/getInfo`, {params})

// export const downloadDealer = (params) => axios.post(`${SERVER.RETAIL}/retailSetDealer/dealerImportFromExcel`, params,{responseType: 'blob'})
//导入后查询
export const importQuery = (params) => axios.get(`${SERVER.WHOLESALES}/retailSetDealer/getInfo`, {params})
// 查询所有员工
export const getDealerUser = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getDealerUser`);

